<template>
    <div id="line">

    </div>
</template>

<script>
import { Line } from '@antv/g2plot';
export default {
    props:{
        lineChart: null
    },
    data(){
        return {
            line:'',
            
            
        }
    },
    created(){
        
        console.log(this.lineChart)
    },
    mounted(){
        this.initLine()
    },
    methods:{
        initLine(){
                // console.log(lineChartData)
            
						this.line = new Line('line', {
							data:this.lineChart,
							padding: 'auto',
							xField: 'Date',
							yField: 'scales',
							xAxis: {
								tickCount: 5,
							},
							slider: {
								start: 0.1,
								end: 0.5,
							},
							// animation: {
								
							// 	appear: {
							// 		animation: 'fade-out', // 动画效果
							// 		duration: 5000, // 动画执行时间
							// 	},
							// },
						});

						this.line.render();
					

        },
        destroyLine(){
            this.line.destroy();
        }

    }
    
}
</script>

<style>

</style>